import request from '@/utils/request'
// 查询明细
export function query(data) {
  return request({
    url: `/andon/callType/query`,
    method: 'post',
    data
  })
}
// 保存
export function save(data) {
  return request({
    url: `/andon/callType/saveOrUpdate`,
    method: 'post',
    data
  })
}

export function batchRemove(data) {
  return request({
    url: `/andon/callType/delete`,
    method: 'delete',
    data
  })
}

export function remove(id) {
  return request({
    url: `/andon/detail/deleteDetail?id=${id}`,
    method: 'delete'
  })
}


// 新增配置人员  推送人员
export function addHuJaoRen(data) {
  return request({
    url: '/andon/callType/saveGradePush',
    method: 'post',
    data
  })
}

// 查看配置人员
export function queryHuJaoRen(id) {
  return request({
    url: `/andon/callType/queryGradePush/${id}`,
    method: 'get'
  })
}

// 查看呼叫人员
export function getByWorkshopAndType(workshopBo, andonTypeBo) {
  return request({
    url: `/andon/callType/${workshopBo}/${andonTypeBo}`,
    method: 'get'
  })
}

// 删除配置人员
export function batchRemoveHuJaoRen(data) {
  return request({
    url: `/andon/callType/deletePush`,
    method: 'delete',
    data
  })
}
